using System;
using System.Collections.Generic;
using System.Text;

using NUnit.Framework;


namespace LogParser.Tests
{
    [TestFixture]
    public class Parser_NUnit
    {
        [SetUp]
        public void Init()
        {

        }

        [Test, Category( "Tests" )]
        public void LoadLogFileTest()
        {
            string logFileName = "./Tests/Resources/l0327003-Match.log";

            TF2LogParser logParser = new TF2LogParser( logFileName );

            Assert.IsTrue( logParser.Parse(), "The TF2 log parse failed" );

        }

        //[Test, Category( "Tests" )]
        //public void LoadLogFileTest1()
        //{
        //    string logFileName = "./Tests/Resources/jinx.log";

        //    TF2LogParser logParser = new TF2LogParser( logFileName );

        //    Assert.IsTrue( logParser.Parse(), "The TF2 log parse failed" );

        //}


       

        [Test, Category("Tests")]
        public void LoadCollectionsTest()
        {
            Collections.TeamList _teamList = new LogParser.Collections.TeamList();
            Collections.WeaponList _weaponList = new LogParser.Collections.WeaponList();

            int teamCount = _teamList.Count;
            int weaponCount = _weaponList.Count;

            Assert.AreEqual(teamCount, 5, "Expected 5 teams, instead found " + teamCount);

            Assert.AreEqual(weaponCount, 0, "Expected 0 weapons, instead found " + weaponCount);


        } 

        
        

    }
}
